-- GENERATED SPELL FOR [Heavy War Golem] --


function spell0_5854(pUnit, Event) --@Stomp,n/a--
pUnit:FullCastSpellOnTarget(12612,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5854', 628, 1)
end

function spell1_5854(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_5854', 646, 1)
end

function Sorts_5854(pUnit, Event)
local choix_sorts_5854 = math.random(0, 1)
if choix_sorts_5854 == 0 then
pUnit:RegisterEvent('spell0_5854', 1, 1)
end
if choix_sorts_5854 == 1 then
pUnit:RegisterEvent('spell1_5854', 1, 1)
end
end

function mob5854_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5854', math.random(1500, 3000), 1)
end

function mob5854_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5854_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5854_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5854, 1, 'mob5854_Action')
RegisterUnitEvent(5854, 2, 'mob5854_Leave')
RegisterUnitEvent(5854, 3, 'mob5854_Kill')
RegisterUnitEvent(5854, 4, 'mob5854_Die')
